<?php
session_start();
include('inc/config.php');
?>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="Hasan" content="EC" />
        <!--  CSS   -->
        <link href="css/en/mycss.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/header.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/editUser.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/footer.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/editProduct.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/admin.css" rel="Stylesheet" type="text/css" />

        <link rel="shortcut icon" href="favicon.ico" />
        <!--  JS   -->
        <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
        <!--        <li class="circle" class="cicles" content="0"></li>-->
        <script src="js/index.js"></script>
        <script src="js/editProduct.js"></script>
        <script src="js/header.js"></script>
        <script src="js/ajax.js"></script>

        <title>Mobizoo Mobiles - News Page</title>
    </head>

    <!-- BODY -->
    <body>
<div id="addingProduct">
            <p>processing...</p>
            <img src="images/loading.gif"/>
        </div>
        <div id="successAdding">
            <p>Success :D</p>
            <img width="40px" src="images/added.png"/>
        </div>
        <div id="allContent">

            <?php
            include('inc/header.php');
            ?>


            <!-- ********************************* -->
            <!-- News -->
            <div id="editProduct">
                <div id="inputs">
                    <?php
                    $id = $_GET['id'];
                    $sql = "SELECT * FROM `product` WHERE id=$id";
                    $result = mysql_query($sql);
                    $row = mysql_fetch_array($result);
                    echo '
                    <iframe src="" name="A" width="1px" height="1px"></iframe> 
                    <form action="inc/updateProduct.php" target="A" method="post" enctype="multipart/form-data">
                    
                    <input type="tesxt" name="id" value="' . $row['id'] . '"/>
                    <input type="tesxt" name="title" value="' . $row['title'] . '"/>
                    <input type="text" name="desc" value="' . $row['descreption'] . '"/>
                    <input type="text" name="price" value="' . $row['price'] . '"/>
                    <input text="discount" name="discount" value="' . $row['discount'] . '"/>
                    <input type="submit" class="updateP"/>
                    </form>
                    ';
                    ?>
                </div>
            </div>
            <!-- ********************************* -->
            <!-- footer -->
            <!-- ********************************* -->
            <?php
            include('inc/footer.php');
            ?>
        </div>
    </body>
</html>